package com.jeasonzhao.report.vml.base;

import com.jeasonzhao.report.vml.enums.Positions;

/**
 * <p>Title:A curve line  </p>
 *
 * <p>Description: </p>
 *
 * <p>Copyright: Copyright (c) 2006</p>
 *
 * <p>Company: JeasonZhao Works</p>
 *
 * @author Jeason Zhao (JeasonZhao@gmail.com)
 * @version 1.0
 */
public class Curve extends Line
{
    private Vector2D m_attr_control1 = null;
    private Vector2D m_attr_control2 = null;
    public Curve()
    {
        super();
    }

    public Curve(Vector2D from,Vector2D to)
    {
        super(from,to);
    }

    public Curve(Vector2D from,Vector2D to,Vector2D c1,Vector2D c2)
    {
        super(from,to);
        m_attr_control1 = c1;
        m_attr_control2 = c2;
    }

    public Vector2D getControl1()
    {
        return m_attr_control1;
    }

    public Vector2D getControl2()
    {
        return m_attr_control2;
    }

    public void setControl1(Vector2D control1)
    {
        this.m_attr_control1 = control1;
    }

    public void setControl2(Vector2D control2)
    {
        this.m_attr_control2 = control2;
    }

    public static void main(String[] argvs)
        throws Exception
    {
        Curve c = new Curve(new Vector2D(0,0),new Vector2D(100,100),
                            new Vector2D(200,200),new Vector2D(50,50));
        c.setPosition(Positions.Absolute);
        System.out.println(c.getScript());
    }
}
